package com.tencreat.mapper.pt;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tencreat.domain.mall.MallOrder;
import com.tencreat.domain.mall.vo.PtIntegralVO;
import com.tencreat.domain.pt.MallPt;
import com.tencreat.domain.pt.vo.*;
import com.tencreat.domain.pt.vo.ResAdminPtHistoryInfoVo;
import com.tencreat.domain.pt.vo.ResAdminPtHistoryVo;
import com.tencreat.domain.pt.vo.ResQueryPtGroupVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 活动详情Mapper接口
 *
 * @author tencreat
 * @date 2021-11-08
 */
public interface MallPtMapper extends BaseMapper<MallPt> {

    List<MallOrder> selectBusiness(String uuid);

    List<MallOrder> selectBusiness1(String uuid);

    Page<ResPtGoodsListAppVO> ptGoodList(Page<ResPtGoodsListAppVO> page, @Param("zoneId") Integer zoneId);

    ResPtGoodsDetailAppVO getDetailApp(Integer id);

    Page<ResPtRecordAppVO> getPtRecord(@Param("page") Page<ResPtRecordAppVO> page, @Param("zoneId") Integer zoneId, @Param("activityStatus")Integer activityStatus, @Param("status") Integer status, @Param("uuid") Long uuid);

    Page<ResPtCouponRecordAppVO> selectPtCouponRecord(@Param("page") Page<ResPtCouponRecordAppVO> page, @Param("uuid") Long uuid);

    List<HaveCashCouponVO> getHaveCashCoupon(Long uuid);

    Page<EarningsVO> getMyEarnings(@Param("page") Page<EarningsVO> page, @Param("uuid") Long uuid);

    Page<ResBonusPoolPCVO> getBonusPools(Page<ResBonusPoolPCVO> page);

    List<ResUserBonusPoolPCVO> selectLotteryUsers(Long id);

    Page<Map<String, Object>> getEarningsRecord(@Param("page") Page<Map<String, Object>> page, @Param("uuid") Integer uuid,
                                                @Param("mobile") String mobile, @Param("type") Integer type, @Param("time") Date time, @Param("status") Integer status);

    IPage<ResAdminPtHistoryVo> queryPtHistoryList(Page page, @Param("ew")Wrapper wrapper);

    IPage<ResAdminPtHistoryInfoVo> queryPtHistoryInfoList(Page page, @Param("ew")Wrapper wrapper);

    List<ResQueryPtGroupVo> queryPtGroup(@Param("ptGoodsId")Long ptGoodsId);
}
